#include "visualizadorFila.h"
//------------------------------------------------------------------------------
visualizadorFila::visualizadorFila(float ax,float ay):visualizadorAbstrato(ax,ay)
{
	flaFila = new Fila;
};
//------------------------------------------------------------------------------
visualizadorFila::~visualizadorFila()
{
	delete flaFila;
	flaFila = NULL;
};
//------------------------------------------------------------------------------
void visualizadorFila::desenha(TImage *area,double escalaX,double escalaY)const
{
		area->Canvas->Brush->Color = clBlue;
		area->Canvas->Rectangle((getX())*escalaX,(getY())*escalaY,(getX()+44)*escalaX,(getY()+44)*escalaY);
		if (escalaX == 1)
		{
				area->Canvas->Brush->Color = clWhite;
				area->Canvas->Rectangle((getX()+5)*escalaX,(getY()+10)*escalaY,(getX()+13)*escalaX,(getY()+18)*escalaY);
				area->Canvas->Rectangle((getX()+10)*escalaX,(getY()+15)*escalaY,(getX()+18)*escalaX,(getY()+23)*escalaY);
				area->Canvas->Rectangle((getX()+15)*escalaX,(getY()+20)*escalaY,(getX()+23)*escalaX,(getY()+28)*escalaY);
				area->Canvas->Brush->Color = clWhite;
				area->Canvas->TextOutA((getX()+6)*escalaX,(getY()+29)*escalaY,"Fila" +IntToStr(getIdentidade()));
		}
};
//------------------------------------------------------------------------------
void visualizadorFila::interage()
{
	TfrmFila * frmFila = new TfrmFila(Application, flaFila);
	frmFila->ShowModal();
	delete(frmFila);
	frmFila = NULL;
};
//------------------------------------------------------------------------------

